import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import LoginWeb from '@/components/LoginWeb'
import AppHeader from '@/components/platform/AppHeader'
import AppBar from '@/components/platform/AppBar'
import CaseManage from '@/components/platform/CaseManage'
import DepartManage from '@/components/platform/DepartManage'
import env from '@/components/platform/env'
import TestPlan from '@/components/platform/TestPlan'
import RealTime from '@/components/platform/RealTime'
import RunHistroy from '@/components/platform/RunHistroy'
import timeTask from '@/components/platform/timeTask'
import UserManage from '@/components/platform/UserManage'
import batch from '@/components/platform/batch'
import tool from './tool'
//import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Router)

export default new Router({
  mode: 'history',
  base:'/stone/',
  routes: [
    {
      path: '/',
      name: 'home',
      component: home
    },
    {
      path: '/login',
      name: 'login',
      component: LoginWeb
    },
    {
      path: '/AppHeader',
      name: 'AppHeader',
      component: AppHeader
    },
    {
      path: '/appbar',
      name: 'AppBar',
      component: AppBar,
      children:[
            {
              path:'/env',
              name:'环境配置',
              component:env
            },
            {
              path:'/TestPlan',
              name:'测试计划管理',
              component:TestPlan
            },

            {
              path:'/UserManage',
              name:'用户管理',
              component:UserManage
            },
            {
              path:'/RealTime',
              name:'实时监控',
              component:RealTime
            },
            {
              path:'/CaseManage',
              name:'接口用例',
              component:CaseManage
            },
            {
              path:'/RunHistroy',
              name:'历史记录',
              component:RunHistroy
            },
            {
              path:'/batch',
              name:'批次查询',
              component:batch
            },
            {
              path:'/timeTask',
              name:'定时任务',
              component:timeTask
            },
            {
              path:'/DepartManage',
              name:'组织管理',
              component:DepartManage
            }
        ]
    },

    ...tool
  ]
})
